ASP.NET Razor VB Loops and Arrays - W3Schools The for each loop walks through a collection until it is finished. The example below walks through the ASP.NET Request.ServerVariables collection.